In order to process value-added service data (for example, content optimization for data or acceleration of a value-added service) over a Gi interface between a GGSN (gateway GPRS support node and a PGW (evolved packet core network device), a value-added service server may be connected in series to the Gi interface between the GGSN and the PGW. FIG. 1 is a schematic diagram of a system architecture in which a Gi interface is connected in series to 4 value-added service servers. The value-added service server may also be referred to as an SE (service enabler), such as a video optimizer, a traffic flow compressor, a data buffer, a deep packet probe, or an HTTP header intensifier.
In the system architecture shown in FIG. 1, the Gi interface is connected in series to the SEs, and a traffic flow passes through each of the SEs. However, in an actual routing process, not all traffic flows need to pass through each SE. In view of this, a transmission path of the traffic flow may be optimized, so that traffic flows of different types are routed according to their respective routing rules. For example, traffic flows of some types need to pass through all SEs, while traffic flows of some types need to pass through some SEs, and traffic flows of some types may even not need to pass through an SE.
In order to optimize a path along which a traffic flow passes through an SE so that traffic flows of different types can be routed according to their respective routing rules, a service-based routing control system shown in FIG. 2 is proposed in the industry, where the routing control system includes: an STC (service traffic classifier), an SPC (service path controller), a Switch (a programmable switch), and an SE.
The routing control system may include at least one Switch and at least one SE. The STC and the SE are directly connected to the Switch, each Switch may be connected to the at least one SE, and Switches may be directly interconnected or interconnected through a standard switch network. The Switch herein refers to a switch in which a flow table entry can be controlled by an external controller by means of programming through an external open interface, such as an OpenFlow switch.
The STC is used for identifying an application type of a traffic flow, such as a video application, a P2P application, an FTP downloading application, or a Web browsing application, and reporting information about the traffic flow and a corresponding service routing rule to the SPC through an Sts interface. In addition, different traffic flows may have a same service routing rule, and traffic flows having a same service routing rule may be considered as traffic flows corresponding to a same service chain; therefore, the STC may also report information about a service chain and a corresponding service routing rule to the SPC. If receiving information about the traffic flow and the corresponding service routing rule, the SPC may directly determine the service routing rule of the traffic flow corresponding to the information about the traffic flow; or if receiving information about the service chain and the corresponding service routing rule, the SPC may determine the corresponding service chain according to the information about the service chain, and then determine the service routing rule of the traffic flows corresponding to the service chain.
The information about a traffic flow is information used for identifying the traffic flow, for example, quintuple information (a source IP address, a destination IP address, a protocol type, a source port number, and a destination port number) about the traffic flow.
The information about a service chain is information used for identifying the service chain which the traffic flows having a same service routing rule are all corresponding to; for example, if a same tunnel identifier is used to perform tunnel encapsulation on data packets in the traffic flows having the same service routing rule, the tunnel identifier may be used as the information about the service chain.
The service routing rule includes a path of routing a traffic flow along a plurality of nodes. The service routing rule may include at least one routing path, where each routing path indicates a routing process in which the traffic flow passes from one node to another node. Using an SE that functions as the node as an example, the combination of the routing paths in the service routing rule may be: SE information sequentially arranged according to a routing order of the traffic flows, where the SE information may be information capable of uniquely identifying the SE, such as a name, an identifier, an IP address, or a MAC address of the SE.
After receiving the information about the traffic flow and the corresponding service routing rule, or, the information about the service chain and the corresponding service routing rule that are sent by the STC, the SPC may determine, according to resource topology information (that is, information about a topology among the Switches, the SEs, and the STC), a path (that is, Switch ports and SEs which are passed through during routing) which the traffic flow passes through when the traffic flow is routed according to sequentially arranged SEs, and generate at least one forwarding rule adaptive to the service routing rule for each Switch on the path, where the forwarding rule includes a routing path of the traffic flow from one node to an adjacent node. The SPC delivers the generated forwarding rule to a Switch which the traffic flow passes through during routing; specifically, the SPC may deliver the forwarding rule in the form of a flow table entry to the Switch. When receiving the traffic flow, the Switch may determine at least one corresponding forwarding rule according to information about the traffic flow (such as quintuple information about the traffic flow) or information about a service chain, and perform routing processing on a data packet in the traffic flow according to the forwarding rule.
When traffic flows corresponding to different service chains need to undergo service processing by using a plurality of SEs connected to different ports of a Switch, a network overhead in the current processing manner is relatively high.